<?php

/**
 * Raspored form.
 *
 * @package    dnevnik
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class RasporedForm extends BaseRasporedForm
{
  public function configure()
  {
      $predmets = $this->getObject()->getRazred()->getSmer()->getPredmets();

      $this->setWidget('dan', new sfWidgetFormChoice(array('choices' => Functions::dani())));
      $this->setWidget('cas_p', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_0', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_1', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_2', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_3', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_4', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_5', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_6', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_7', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->setWidget('cas_8', new sfWidgetFormChoice(array('choices' => $predmets)));
      $this->widgetSchema->setFormFormatterName('list');

      /*$this->setValidators(array(
      'id'        => new sfValidatorPropelChoice(array('model' => 'Raspored', 'column' => 'id', 'required' => false)),
      'razred_id' => new sfValidatorPropelChoice(array('model' => 'Razred', 'column' => 'id')),
      'dan'       => new sfValidatorInteger(),
      'tip'       => new sfValidatorInteger(),
      'cas_p'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_0'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_1'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_2'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_3'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_4'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_5'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_6'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_7'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
      'cas_8'     => new sfValidatorPropelChoice(array('model' => 'Predmet', 'column' => 'id', 'required' => false)),
    ));*/
  }
}
